#ifndef JSON_OBJECT_H
#define JSON_OBJECT_H
#include "private_implementations/JsonTypes.h"

namespace simframework
{
	namespace json
	{
		class JsonArrayNode;
		class JsonObjectNode : public JsonAbstractNode 
		{
			SimWString			m_valueStr;
			SimWStringIter		m_startIt;
			SimWStringIter		m_endIt;
			JsonAbstractNode *	getValue(JSONType type, SimWString name, int* status);

		public:
			JsonObjectNode(SimWString str);
			/* This should never return NULL. if status == JSON_SUCCESS, caller should delete them */
			JsonObjectNode *	getObjectValueByKey(SimWString name, int* status = NULL);
			/* This should never return NULL. if status == JSON_SUCCESS, caller should delete them */
			JsonArrayNode *		getArrayValueByKey(SimWString name, int* status = NULL);
			SimWString			getStringValueByKey(SimWString name, int* status = NULL);
			double				getFloatValueByKey(SimWString name, int* status = NULL);
			int					getIntValueByKey(SimWString name, int* status = NULL);
			bool				getBooleanValueByKey(SimWString name, int* status = NULL);
		};
	}
}

#endif